import request from '@/utils/request';

export function massList(data: any) {
    return request({
        url: '/scrm-api/console/channel/moment/mass/v2/list',
        method: 'POST',
        data,
        noNeedLoading: true
    });
}

/**
 * 朋友圈创建接口
 */
export function massCreate(data: any) {
    return request({
        url: '/scrm-api/console/channel/moment/mass/v2/create',
        method: 'POST',
        data
    });
}

export function massBasic(data: any, noNeedLoading = false) {
    return request({
        url: '/scrm-api/console/channel/moment/mass/basic',
        method: 'GET',
        params: data,
        noNeedLoading
    });
}

export function massTop(data: any, noNeedLoading = false) {
    return request({
        url: '/scrm-api/console/channel/moment/mass/top',
        method: 'GET',
        params: data,
        noNeedLoading
    });
}

export function massBrowse(data: any, noNeedLoading = false) {
    return request({
        url: '/scrm-api/console/channel/moment/mass/browse',
        method: 'GET',
        params: data,
        noNeedLoading
    });
}

export function massCustTag(data: any) {
    return request({
        url: '/scrm-api/console/channel/moment/mass/cust/tag',
        method: 'GET',
        params: data
    });
}

export function massInfoData(data: any) {
    return request({
        url: '/scrm-api/console/channel/moment/mass/info/data',
        method: 'GET',
        params: data,
        noNeedLoading: true
    });
}

export function massExport(data: any) {
    return request({
        url: '/scrm-api/console/channel/moment/mass/export/info/data',
        method: 'GET',
        params: data
    });
}

export function messInfoRemind(data: any) {
    return request({
        url: '/scrm-api/console/channel/moment/mass/info/remind',
        method: 'GET',
        params: data
    });
}

export function messRemind(data: any) {
    return request({
        url: '/scrm-api/console/channel/moment/mass/remind',
        method: 'GET',
        params: data
    });
}
/**
 * 获取朋友圈详情
 */
export const getDetail = (data: any, noNeedLoading = false) => {
    return request({
        url: '/scrm-api/console/channel/moment/mass/v2/detail',
        method: 'GET',
        params: data,
        noNeedLoading
    });
};
// 编辑朋友圈
export const editFriend = (data: any) => {
    return request({
        url: '/scrm-api/console/channel/moment/mass/v2/update',
        method: 'POST',
        data
    });
};
// 删除朋友圈
export const delFriend = (data: any) => {
    return request({
        url: '/scrm-api/console/channel/moment/mass/del',
        method: 'GET',
        params: data
    });
};

/**
 * 结束朋友圈
 */
// 删除朋友圈
export const endFriend = (data: any) => {
    return request({
        url: '/scrm-api/console/channel/moment/mass/close',
        method: 'POST',
        data
    });
};

/**
 * 导出执行明细
 */
export const exportData = (data: any) => {
    return request({
        url: '/scrm-api/console/channel/moment/mass/v2/export/info/data',
        method: 'POST',
        data
    });
};
